<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <title>Home</title>
    <!-- for-mobile-apps -->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta name=""/>
    <script type="application/x-javascript"> addEventListener("load", function () {
        setTimeout(hideURLbar, 0);
    }, false);

    function hideURLbar() {
        window.scrollTo(0, 1);
    } </script>
    <!-- //for-mobile-apps -->
    <link href="${pageContext.request.contextPath}/front-style/css/bootstrap.css" rel="stylesheet" type="text/css"
          media="all"/>
    <!-- pop-up -->
    <link href="${pageContext.request.contextPath}/front-style/css/popuo-box.css" rel="stylesheet" type="text/css"
          media="all"/>
    <!-- //pop-up -->
    <link href="${pageContext.request.contextPath}/front-style/css/easy-responsive-tabs.css" rel='stylesheet'
          type='text/css'/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/zoomslider.css"/>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/front-style/css/style.css"/>
    <link href="${pageContext.request.contextPath}/front-style/css/font-awesome.css" rel="stylesheet">
    <script type="text/javascript"
            src="${pageContext.request.contextPath}/front-style/js/modernizr-2.6.2.min.js"></script>
    <!--/web-fonts-->
    <link href='http://fonts.googleapis.com/css?family=Tangerine:400,700' rel='stylesheet' type='text/css'>
    <link href="http://fonts.googleapis.com/css?family=Lato:100,100i,300,300i,400,400i,700,700i,900" rel="stylesheet">
    <link href='http://fonts.googleapis.com/css?family=Montserrat:400,700' rel='stylesheet' type='text/css'>
    <!--//web-fonts-->
</head>
<body>
<!--/main-header-->
<!--/banner-section-->
<div id="demo-1"
     data-zs-src='["${pageContext.request.contextPath}/front-style/images/2.jpg", "${pageContext.request.contextPath}/front-style/images/1.jpg", "${pageContext.request.contextPath}/front-style/images/3.jpg","${pageContext.request.contextPath}/front-style/images/4.jpg"]'
     data-zs-overlay="dots">
    <div class="demo-inner-content">
        <!--/header-w3l-->
        <div class="header-w3-agileits" id="home">
            <div class="inner-header-agile">
                <nav class="navbar navbar-default">
                    <div class="navbar-header">
                        <button type="button" class="navbar-toggle" data-toggle="collapse"
                                data-target="#bs-example-navbar-collapse-1">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <h1><a href="${pageContext.request.contextPath}/index.jsp"><span>M</span>ovies <span>P</span>ro</a>
                        </h1>
                    </div>
                    <!-- navbar-header -->
                    <%--头注释--%>
                    <%--<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                            <ul class="nav navbar-nav">
                            <li class="active"><a href="${pageContext.request.contextPath}/index.jsp">首页</a></li>
                                <c:if test="${sessionScope.userinfo!=null}">
                                    <li><a href="${pageContext.request.contextPath}/orders/toOrderList">订单列表</a></li>
                                </c:if>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Genre <b class="caret"></b></a>
                                <ul class="dropdown-menu multi-column columns-3">
                                    <li>
                                    <div class="col-sm-4">
                                        <ul class="multi-column-dropdown">
                                            <li><a href="genre.html">Action</a></li>
                                            <li><a href="genre.html">Biography</a></li>
                                            <li><a href="genre.html">Crime</a></li>
                                            <li><a href="genre.html">Family</a></li>
                                            <li><a href="horror.html">Horror</a></li>
                                            <li><a href="genre.html">Romance</a></li>
                                            <li><a href="genre.html">Sports</a></li>
                                            <li><a href="genre.html">War</a></li>
                                        </ul>
                                    </div>
                                    <div class="col-sm-4">
                                        <ul class="multi-column-dropdown">
                                            <li><a href="genre.html">Adventure</a></li>
                                            <li><a href="comedy.html">Comedy</a></li>
                                            <li><a href="genre.html">Documentary</a></li>
                                            <li><a href="genre.html">Fantasy</a></li>
                                            <li><a href="genre.html">Thriller</a></li>
                                        </ul>
                                    </div>
                                    <div class="col-sm-4">
                                        <ul class="multi-column-dropdown">
                                            <li><a href="genre.html">Animation</a></li>
                                            <li><a href="genre.html">Costume</a></li>
                                            <li><a href="genre.html">Drama</a></li>
                                            <li><a href="genre.html">History</a></li>
                                            <li><a href="genre.html">Musical</a></li>
                                            <li><a href="genre.html">Psychological</a></li>
                                        </ul>
                                    </div>
                                    <div class="clearfix"></div>
                                    </li>
                                </ul>
                            </li>
                            <li><a href="series.html">tv - series</a></li>
                            <li><a href="news.html">news</a></li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Country <b class="caret"></b></a>
                                <ul class="dropdown-menu multi-column columns-3">
                                    <li>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">Asia</a></li>
                                                <li><a href="genre.html">France</a></li>
                                                <li><a href="genre.html">Taiwan</a></li>
                                                <li><a href="genre.html">United States</a></li>
                                            </ul>
                                        </div>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">China</a></li>
                                                <li><a href="genre.html">HongCong</a></li>
                                                <li><a href="genre.html">Japan</a></li>
                                                <li><a href="genre.html">Thailand</a></li>
                                            </ul>
                                        </div>
                                        <div class="col-sm-4">
                                            <ul class="multi-column-dropdown">
                                                <li><a href="genre.html">Euro</a></li>
                                                <li><a href="genre.html">India</a></li>
                                                <li><a href="genre.html">Korea</a></li>
                                                <li><a href="genre.html">United Kingdom</a></li>
                                            </ul>
                                        </div>
                                        <div class="clearfix"></div>
                                    </li>
                                </ul>
                            </li>
                            <li><a href="list.html">A - z list</a></li>
                            <li><a href="contact.html">Contact</a></li>
                        </ul>

                    </div>--%>
                    <div class="clearfix"></div>
                </nav>
                <div class="w3ls_search">
                    <div class="cd-main-header">
                        <ul class="cd-header-buttons">
                            <li><a class="cd-search-trigger" href="#cd-search"> <span></span></a></li>
                        </ul> <!-- cd-header-buttons -->
                    </div>
                    <div id="cd-search" class="cd-search">
                        <form action="${pageContext.request.contextPath}/PayController/goListJsp" method="post">
                            <input name="movieName" type="search" placeholder="Search...">
                        </form>
                    </div>
                </div>

            </div>

        </div>
        <!--//header-w3l-->
        <!--/banner-info-->
        <div class="baner-info">
            <h3>下次一定 <span>影院</span>线上系统</h3>
            <h4>by.严宇 赵井东 陆亮</h4>
        </div>
        <!--/banner-ingo-->
    </div>
</div>
<!--/banner-section-->
<!--//main-header-->
<!--/banner-bottom-->
<div class="w3_agilits_banner_bootm">
    <div class="w3_agilits_inner_bottom">
        <div class="col-md-6 wthree_agile_login">
            <%--显示跳转条--%>
            <c:if test="${sessionScope.userinfo!=null}">
                <ul>
                    <li><i class="fa fa-phone" aria-hidden="true"></i> (+000) 009 455 4088</li>
                    <li>
                        <div style="width: 20px"></div>
                    </li>
                    <li><img style="height: 40px;width: 40px;margin-top: -10px"
                             src="${pageContext.request.contextPath}/DownloadFileServlet?fileName=${sessionScope.userinfo.user_img}"
                             alt="头像"></li>
                    <li>
                        <div style="width: 20px"></div>
                    </li>
                    <li><i>${sessionScope.userinfo.user_acount}</i></li>
                    <li>
                        <div style="width: 20px"></div>
                    </li>
                    <li><a href="#" class="login" data-toggle="modal" data-target="#myModall6">个人中心</a></li>
                    <li><a class="login" href="${pageContext.request.contextPath}/userinfo/exit">退出</a></li>
                    <c:if test="${sessionScope.userinfo!=null}">
                        <li><a class="login" href="${pageContext.request.contextPath}/orders/toOrderList">订单列表</a></li>
                    </c:if>
                </ul>
            </c:if>
            <c:if test="${sessionScope.userinfo==null}">
                <ul>
                    <li><i class="fa fa-phone" aria-hidden="true"></i> (+000) 009 455 4088</li>
                    <li><a href="#" class="login" data-toggle="modal" data-target="#myModal4">登录</a></li>
                    <li><a href="#" class="login reg" data-toggle="modal" data-target="#myModal5">注册</a></li>

                </ul>
            </c:if>

        </div>
        <div class="col-md-6 wthree_share_agile">

            <div class="single-agile-shar-buttons">

            </div>
        </div>
    </div>
</div>
<!--//banner-bottom-->
<!-- Modal1 -->
<div class="modal fade" id="myModal4" tabindex="-1" role="dialog">

    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4>登录</h4>
                <div class="login-form">
                    <form action="${pageContext.request.contextPath}/userinfo/login" method="post">
                        <input type="text" name="user_acount" placeholder="账号" required="">
                        <input type="password" name="user_password" placeholder="密码" required="">
                        <div class="tp">
                            <input type="submit" value="LOGIN NOW">
                        </div>
                        <div class="forgot-grid">
                            <div class="log-check">
                                <label class="checkbox"><input type="checkbox" name="checkbox">Remember me</label>
                            </div>
                            <div class="forgot">
                                <a href="#" data-toggle="modal" data-target="#myModal2">Forgot Password?</a>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- //Modal1 -->
<!-- Modal1 -->
<div class="modal fade" id="myModal5" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4>注册</h4>
                <div class="login-form">
                    <form action="${pageContext.request.contextPath}/userinfo/register" method="post" id="us_reg"
                          enctype="multipart/form-data">
                        <input type="text" name="user_acount" id="user_acount" placeholder="账号" required
                               onchange="che(this)"><span id="na_te"></span>
                        <input type="password" name="user_password" id="user_password" placeholder="密码" required>
                        <input type="password" name="conform_password" placeholder="确认密码" required>
                        <input type="tel" name="user_tel" id="user_tel" placeholder="电话" required style="width: 100%">
                        <input type="file" name="user_img" placeholder="头像" required>
                        <div class="tp">
                            <input type="submit" value="REGISTER NOW">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="modal fade" id="myModall6" tabindex="-1" role="dialog">
    <div class="modal-dialog">
        <!-- Modal content-->
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">&times;</button>
                <h4>个人中心</h4>
                <p>重新登录方可生效</p>
                <div class="login-form">
                    <form action="${pageContext.request.contextPath}/userinfo/updateByUser" method="post"
                          enctype="multipart/form-data" id="up_user">
                        <input type="text" name="user_no" value="${sessionScope.userinfo.user_no}" hidden>
                        <input type="text" name="user_acount" value="${sessionScope.userinfo.user_acount}"
                               placeholder="账号" required="" disabled>
                        <input type="password" name="user_password1" id="user_password1" placeholder="新密码" required="">
                        <input type="password" name="conform_password1" placeholder="确认密码" required="">
                        <input type="tel" style="width: 100%" name="user_tel1" placeholder="电话"
                               value="${sessionScope.userinfo.user_tel}" required="">
                        <input type="file" name="user_img" placeholder="头像">
                        <div class="tp">
                            <input type="submit" value="确认修改">
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- //Modal1 -->
<!--/content-inner-section-->
<div class="w3_content_agilleinfo_inner">
    <div class="agile_featured_movies">
        <!--/agileinfo_tabs-->
        <div class="agileinfo_tabs">
            <!--/tab-section-->
            <h3 class="agile_w3_title">最新 <span>上映</span></h3>
            <div id="horizontalTab">
                <ul class="resp-tabs-list" style="margin-left: 20px">
                    <li><a style="color:whitesmoke;" href="${pageContext.request.contextPath}/PayController/goListJsp">更多电影</a>
                    </li>
                    <%--<li>最热电影</li>--%>
                    <%--<li>Top Rating </li>--%>

                </ul>
                <div class="resp-tabs-container">
                    <div class="tab1">
                        <div class="tab_movies_agileinfo">
                            <div class="w3_agile_featured_movies">
                                <div class="col-md-5 video_agile_player">
                                    <div class="video-grid-single-page-agileits">
                                        <div data-video="f2Z65fobH2I" id="video"><a id="goToSingle"><img src="" alt=""
                                                                                                         class="img-responsive"
                                                                                                         id="topImg"
                                                                                                         style="height: 800px"/>
                                        </a></div>
                                    </div>


                                    <div class="player-text">
                                        <p class="fexi_header" id="topName"></p>
                                        <p class="fexi_header_para" id="topContent"></p>
                                        <p class="fexi_header_para" id="topDate"></p>

                                    </div>
                                </div>
                                <div class="col-md-7 wthree_agile-movies_list" id="topMovies">

                                </div>
                                <div class="clearfix"></div>
                            </div>
                            <div class="cleafix"></div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <!--//tab-section-->

        <h3 class="agile_w3_title">正在 <span>热映</span></h3>
        <!--/requested-movies-->
        <div class="wthree_agile-requested-movies">
            <div id="hotMovs"></div>
            <div class="clearfix"></div>
        </div>
        <!--//requested-movies-->

    </div>
</div>
<!--//content-inner-section-->

<!--/footer-bottom-->
<div class="contact-w3ls" id="contact">
    <div class="footer-w3lagile-inner">
        <h2><span>下次一定影院在线系统</span></h2>
        <p class="para">不要下次一定,这就是一定.</p>
        <div class="footer-grids w3-agileits">
            <div class="col-md-2 footer-grid">
                <h4>广告位</h4>
                <ul>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                </ul>
            </div>
            <div class="col-md-2 footer-grid">
                <h4>广告位</h4>
                <ul>

                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>
                    <li><a href="javascript:void(0)">广告位招租</a></li>


                </ul>
            </div>


            <div class="col-md-2 footer-grid">
                <h4>合作单位</h4>
                <ul class="w3-tag2">
                    <li><a href="javascript:void(0)">合作单位1</a></li>
                    <li><a href="javascript:void(0)">合作单位2</a></li>
                    <li><a href="javascript:void(0)">合作单位3</a></li>
                    <li><a href="javascript:void(0)">合作单位4</a></li>
                    <li><a href="javascript:void(0)">合作单位5</a></li>
                    <li><a href="javascript:void(0)">合作单位6</a></li>
                    <li><a href="javascript:void(0)">合作单位7</a></li>
                </ul>


            </div>
            <div class="col-md-2 footer-grid">
                <h4>合作院线</h4>
                <div class="footer-grid1">
                    <div class="footer-grid1-left">
                        <a href="javascript:void(0)"><img
                                src="${pageContext.request.contextPath}/front-style/images/1.jpg" alt=" "
                                class="img-responsive"></a>
                    </div>
                    <div class="footer-grid1-right">
                        <a href="javascript:void(0)">左侧放logo,右侧是名字</a>

                    </div>
                    <div class="clearfix"></div>
                </div>
            </div>
            <div class="col-md-2 footer-grid">
                <h4 class="b-log"><a href="${pageContext.request.contextPath}/index.jsp"><span>我</span>的 <span>院</span>线</a>
                </h4>

                <div class="clearfix"></div>
            </div>
            <div class="clearfix"></div>
            <ul class="bottom-links-agile">
                <li><a href="javascript:void(0)" title="Font Icons" class="aiguo">民主</a></li>
                <li><a href="javascript:void(0)" title="Short Codes" class="aiguo">富强</a></li>
                <li><a href="javascript:void(0)" title="contact" class="aiguo">爱国</a></li>

            </ul>
        </div>


    </div>

</div>
<div class="w3agile_footer_copy">
    <p>制作团队 &copy; 四期三阶段.严宇 赵井东 陆亮.<a target="_blank" href="http://www.baidu.com/">有问题问百度</a></p>
</div>
<a href="#home" id="toTop" class="scroll" style="display: block;"> <span id="toTopHover"
                                                                         style="opacity: 1;"> </span></a>

<script src="${pageContext.request.contextPath}/front-style/js/jquery-1.11.1.min.js"></script>
<!-- Dropdown-Menu-JavaScript -->
<script>
    $(document).ready(function () {
        $(".dropdown").hover(
            function () {
                $('.dropdown-menu', this).stop(true, true).slideDown("fast");
                $(this).toggleClass('open');
            },
            function () {
                $('.dropdown-menu', this).stop(true, true).slideUp("fast");
                $(this).toggleClass('open');
            }
        );
    });
</script>
<!-- //Dropdown-Menu-JavaScript -->


<script type="text/javascript"
        src="${pageContext.request.contextPath}/front-style/js/jquery.zoomslider.min.js"></script>
<!-- search-jQuery -->
<script src="${pageContext.request.contextPath}/front-style/js/main.js"></script>
<script src="${pageContext.request.contextPath}/front-style/js/simplePlayer.js"></script>
<script>
    $("document").ready(function () {
        $("#video").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video1").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video2").simplePlayer();
    });
</script>
<script>
    $("document").ready(function () {
        $("#video3").simplePlayer();
    });
</script>

<!-- pop-up-box -->
<script src="${pageContext.request.contextPath}/front-style/js/jquery.magnific-popup.js"
        type="text/javascript"></script>
<!--//pop-up-box -->

<div id="small-dialog1" class="mfp-hide">
    <iframe src=""></iframe>
</div>
<div id="small-dialog2" class="mfp-hide">
    <iframe src=""></iframe>
</div>
<script>
    $(document).ready(function () {
        $('.w3_play_icon,.w3_play_icon1,.w3_play_icon2').magnificPopup({
            type: 'inline',
            fixedContentPos: false,
            fixedBgPos: true,
            overflowY: 'auto',
            closeBtnInside: true,
            preloader: false,
            midClick: true,
            removalDelay: 300,
            mainClass: 'my-mfp-zoom-in'
        });

    });
</script>
<script src="${pageContext.request.contextPath}/front-style/js/easy-responsive-tabs.js"></script>
<script>
    $(document).ready(function () {
        $('#horizontalTab').easyResponsiveTabs({
            type: 'default', //Types: default, vertical, accordion
            width: 'auto', //auto or any width like 600px
            fit: true,   // 100% fit in a container
            closed: 'accordion', // Start closed if in accordion view
            activate: function (event) { // Callback function if tab is switched
                var $tab = $(this);
                var $info = $('#tabInfo');
                var $name = $('span', $info);
                $name.text($tab.text());
                $info.show();
            }
        });
        $('#verticalTab').easyResponsiveTabs({
            type: 'vertical',
            width: 'auto',
            fit: true
        });
    });
</script>
<link href="${pageContext.request.contextPath}/front-style/css/owl.carousel.css" rel="stylesheet" type="text/css"
      media="all">
<script src="${pageContext.request.contextPath}/front-style/js/owl.carousel.js"></script>
<script>
    $(document).ready(function () {
        $("#owl-demo").owlCarousel({

            autoPlay: 3000, //Set AutoPlay to 3 seconds
            autoPlay: true,
            navigation: true,

            items: 5,
            itemsDesktop: [640, 4],
            itemsDesktopSmall: [414, 3]

        });

    });
</script>

<!--/script-->
<script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/move-top.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/front-style/js/easing.js"></script>

<script type="text/javascript">
    jQuery(document).ready(function ($) {
        $(".scroll").click(function (event) {
            event.preventDefault();
            $('html,body').animate({scrollTop: $(this.hash).offset().top}, 900);
        });
    });
</script>
<script type="text/javascript">
    $(document).ready(function () {
        /*
        var defaults = {
              containerID: 'toTop', // fading element id
            containerHoverID: 'toTopHover', // fading element hover id
            scrollSpeed: 1200,
            easingType: 'linear'
         };
        */

        $().UItoTop({easingType: 'easeOutQuart'});

    });
</script>
<!--end-smooth-scrolling-->
<script src="${pageContext.request.contextPath}/front-style/js/bootstrap.js"></script>
</body>
<script>
    $(function () {
        //top电影的显示(最大的图片以及相关信息)
        $.ajax({
            async: true,
            url: "${pageContext.request.contextPath}/movies/topImg",
            data: {startNo: 0, endNo: 1},
            dataType: "json",
            success: function (result) {
                $("#topImg").attr("src", "${pageContext.request.contextPath}/DownloadFile?movieImg=" + result[0].movieImg);
                $("#topContent").html("<span class=\"conjuring_w3\">故事简介<label>:</label></span>" + result[0].movieContent);
                $("#topName").text(result[0].movieName);
                $("#topDate").html("<span>上映日期<label>:</label></span>" + result[0].movieDate);
                $("#goToSingle").attr("href", "${pageContext.request.contextPath}/movies/goOrderDtail?movieNo=" + result[0].movieNo);
            }
        });

        //top电影的遍历显示
        $.ajax({
            async: true,
            url: "${pageContext.request.contextPath}/movies/topImg",
            data: {startNo: 1, endNo: 9},
            dataType: "json",
            success: function (result) {
                $("#topMovies").empty();
                var content = "";
                $.each(result, function (n, movie) {
                    content += "<div class=\"w3l-movie-gride-agile\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"${pageContext.request.contextPath}/movies/goOrderDtail?movieNo=" + movie.movieNo + "\" class=\"hvr-sweep-to-bottom\"><img src=\"${pageContext.request.contextPath}/DownloadFile?movieImg=" + movie.movieImg + "\" title=\"" + movie.movieName + "\" class=\"img-responsive\" alt=\" \" style=\"heigth:350px;width:250px;\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"w3l-action-icon\"><i class=\"fa fa-play-circle-o\" aria-hidden=\"true\"></i></div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"mid-1 agileits_w3layouts_mid_1_home\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"w3l-movie-text\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h6><a href=\"${pageContext.request.contextPath}/movies/goOrderDtail?movieNo=" + movie.movieNo + "\">" + movie.movieName + "</a></h6>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"mid-2 agile_mid_2_home\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>" + movie.movieDate + "</p>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"block-stars\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>票价:" + movie.moviePrice + "</p>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ribben\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>NEW</p>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t</div>";
                });
                $("#topMovies").html(content);
            }
        });
        //推荐电影
        $.ajax({
            async: false,
            url: "${pageContext.request.contextPath}/movies/getRandMovs",
            dataType: "json",
            success: function (result) {
                $("#hotMovs").empty();
                var content = "";
                $.each(result, function (n, movie) {
                    content += "<div class=\"col-md-2 w3l-movie-gride-agile requested-movies\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"${pageContext.request.contextPath}/movies/goOrderDtail?movieNo=" + movie.movieNo + "\" class=\"hvr-sweep-to-bottom\"><img src=\"${pageContext.request.contextPath}/DownloadFile?movieImg=" + movie.movieImg + "\" title=\"" + movie.movieName + "\" style=\"height:350px\" class=\"img-responsive\" alt=\" \">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"w3l-action-icon\"><i class=\"fa fa-play-circle-o\" aria-hidden=\"true\"></i></div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</a>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"mid-1 agileits_w3layouts_mid_1_home\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"w3l-movie-text\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<h6><a href=\"${pageContext.request.contextPath}/movies/goOrderDtail?movieNo=" + movie.movieNo + "\">" + movie.movieName + "</a></h6>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"mid-2 agile_mid_2_home\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>" + movie.movieDate + "</p>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"block-stars\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>票价:" + movie.moviePrice + "</p>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"clearfix\"></div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div class=\"ribben one\">\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>热映</p>\n" +
                        "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n" +
                        "\t\t\t\t\t\t\t\t\t\t</div>";
                });
                $("#hotMovs").html(content);
            }
        });
    })
</script>
<%--<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/lib/jquery.js"></script>--%>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/jquery.validate.min.js"></script>
<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
<script>
    $.validator.setDefaults({
        submitHandler: function () {
            return true;
        }
    });
    $().ready(function () {
// 在键盘按下并释放及提交后验证提交表单
        $("#us_reg").validate({
            rules: {
                user_acount: {
                    required: true,
                    minlength: 2
                },
                user_password: {
                    required: true,
                    minlength: 5
                },
                conform_password: {
                    required: true,
                    minlength: 5,
                    equalTo: "#user_password"
                },
                user_tel: {
                    required: true,
                    isTel: true
                }
            },
            messages: {
                user_acount: {
                    required: "请输入用户名",
                    minlength: "用户名必需由两个字母组成"
                },
                user_password: {
                    required: "请输入密码",
                    minlength: "密码长度不能小于 5 个字母"
                },
                conform_password: {
                    required: "请输入密码",
                    minlength: "密码长度不能小于 5 个字母",
                    equalTo: "两次密码输入不一致"
                }
            }
        });
        $("#up_user").validate({
            rules: {
                user_password1: {
                    required: true,
                    minlength: 5
                },
                conform_password1: {
                    required: true,
                    minlength: 5,
                    equalTo: "#user_password1"
                },
                user_tel1: {
                    required: true,
                    isTel: true
                }
            },
            messages: {
                user_password1: {
                    required: "请输入密码",
                    minlength: "密码长度不能小于 5 个字母"
                },
                conform_password1: {
                    required: "请输入密码",
                    minlength: "密码长度不能小于 5 个字母",
                    equalTo: "两次密码输入不一致"
                }
            }
        })
        jQuery.validator.addMethod("isTel", function (value, element) {
            var tel = /^1[3,4,5,6,7,8,9]\d{9}$/;
            return tel.test(value);
        }, "请输入正确的电话号码");
    });
</script>
<style>
    .error {
        color: red;
    }
</style>
<script>
    function che(obj) {
        /*alert($(obj).val())*/
        var na = $(obj).val()
        $.post("${pageContext.request.contextPath}/userinfo/queryBy", {
            user_acount: na
        }, function (data) {
            if (data.user_no == 0) {
                $("#na_te").html("")
            } else {
                $("#na_te").html("不可用")
            }
        })
    }
</script>
</html>